package com.fxu.docx2md.util;

import com.fxu.docx2md.dto.MdLine;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * Markdown处理工具类
 * @author fangxu
 * @version 1.0.0
 */
@Slf4j
public class MdUtil {

    public static String getMdText(List<MdLine> elements) {
        StringBuilder builder = new StringBuilder();
        for (MdLine element : elements) {
            switch (element.getType()) {
                case TITLE:
                    builder.append(getMdText1(element.getTexts()));
                    break;
                case ENTRY:
                    builder.append(getMdText1(element.getTexts()));
                    break;
                case IMAGE:
                    builder.append(getMdText1(element.getTexts()));
                    break;
                case MATH:
                    builder.append(getMdText1(element.getTexts()));
                    break;
                case INFO:
                    builder.append(getMdText1(element.getTexts()));
                    break;
                case TIP:
                    builder.append(getMdText1(element.getTexts()));
                    break;
            }
        }
        return builder.toString();
    }

    public static String getMdText1(List<String> texts) {
        return "";
    }
}